import { ref } from 'vue'
import { defineStore } from 'pinia'
import {getFilmList} from '../api/getdata'
export const useMovieStore = defineStore('filmLists', () => {
  const list = ref([])
  
  function getFilmData() {
    getFilmList().then((res) => {
      // console.log(res)
      list.value = res.data.result
      
    })
  }

  return { list, getFilmData }
})
